import { getList, getList2 } from '../api/index'

export let get_List = () => {
    return async dispatch => {
        let { data } = await getList()
        dispatch({
            type: 'GET_LIST',
            payload: data
        })
    }
}

export let get_List2 = () => {
    return async dispatch => {
        let { data } = await getList2()
        dispatch({
            type: 'GET_LIST2',
            payload: data
        })
    }
}

export let filter_Btn = (nickName) => {
    return dispatch => {
        dispatch({
            type: 'FILTER_BTN',
            payload: nickName
        })
    }
}

export let edit_Btn = (obj) => {
    return dispatch => {
        dispatch({
            type: 'EDIT_BTN',
            payload: obj
        })
    }
}

export let detele_Btn = (index) => {
    return dispatch => {
        dispatch({
            type: 'DETELE_BTN',
            payload: index
        })
    }
}